package com.mask.sca.system.feign;


import com.mask.sca.core.entity.UserDTO;
import com.mask.sca.core.response.ApiResponse;
import com.mask.sca.system.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


@RestController
@RequestMapping("/api/system")
public class FeignSystemServiceImpl{

    @Resource
    private UserService userService;

    @GetMapping("/loadByUsername")
    public ApiResponse<UserDTO> loadByUsernameAndTenantId(@RequestParam String username) {
        return ApiResponse.success(userService.loadByUsernameAndTenantId(username));
    }
} 